package com.pine.sunshineelder.elderfood.vo ;

import java.time.LocalDate;
import java.time.LocalDateTime;

import com.pine.sunshineelder.common.entity.AccountEntity;
import com.pine.sunshineelder.common.entity.ElderEntity;
import com.pine.sunshineelder.common.entity.ElderFoodEntity;
import com.pine.sunshineelder.common.entity.StaffEntity;

import lombok.Data;
@Data
public class ElderFoodmodifyVo {
	private static final long serialVersionUID = -848923226882706246L;
	private String aideName;
	private String elderName;
	private LocalDate mealDate;
	private String mealTime;
	private String foods;
	private String foodImage;
	private LocalDateTime createTime;
	
	public static ElderFoodmodifyVo of(ElderFoodEntity ef) {
		ElderEntity e=ef.getElder();
		StaffEntity s=ef.getAide();
		ElderFoodmodifyVo efv=new ElderFoodmodifyVo();
		efv.setAideName(s.getName());
		efv.setElderName(e.getName());
		efv.setMealDate(ef.getMealDate());
		efv.setMealTime(ef.getMealTime());
		efv.setFoods(ef.getFoods());
		efv.setFoodImage(ef.getFoodImage());
		return efv;
	}
}
